.class Lcom/example/m6wmr/ShopDishesActivity$3;
.super Ljava/lang/Thread;
.source "ShopDishesActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/example/m6wmr/ShopDishesActivity;->getShopSource()Z
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/example/m6wmr/ShopDishesActivity;


# direct methods
.method constructor <init>(Lcom/example/m6wmr/ShopDishesActivity;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/example/m6wmr/ShopDishesActivity$3;->this$0:Lcom/example/m6wmr/ShopDishesActivity;

    .line 479
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 15

    .prologue
    .line 481
    invoke-super {p0}, Ljava/lang/Thread;->run()V

    .line 483
    new-instance v2, Landroid/os/Message;

    invoke-direct {v2}, Landroid/os/Message;-><init>()V

    .line 484
    .local v2, "msg":Landroid/os/Message;
    iget-object v12, p0, Lcom/example/m6wmr/ShopDishesActivity$3;->this$0:Lcom/example/m6wmr/ShopDishesActivity;

    const-string v13, "userInfo"

    .line 485
    const/4 v14, 0x0

    .line 484
    invoke-virtual {v12, v13, v14}, Lcom/example/m6wmr/ShopDishesActivity;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v5

    .line 486
    .local v5, "preferences":Landroid/content/SharedPreferences;
    const-string v12, "uid"

    const-string v13, ""

    invoke-interface {v5, v12, v13}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    .line 487
    .local v9, "uid":Ljava/lang/String;
    const-string v12, "pass"

    const-string v13, ""

    invoke-interface {v5, v12, v13}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    .line 488
    .local v6, "pwd":Ljava/lang/String;
    new-instance v12, Ljava/lang/StringBuilder;

    iget-object v13, p0, Lcom/example/m6wmr/ShopDishesActivity$3;->this$0:Lcom/example/m6wmr/ShopDishesActivity;

    iget-object v13, v13, Lcom/example/m6wmr/ShopDishesActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v13}, Lmyapp/MyApp;->getWebConfig()Ljava/lang/String;

    move-result-object v13

    invoke-static {v13}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v13

    invoke-direct {v12, v13}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 489
    const-string v13, "/index.php?ctrl=app&action=newshopinfo&shopid="

    invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    iget-object v13, p0, Lcom/example/m6wmr/ShopDishesActivity$3;->this$0:Lcom/example/m6wmr/ShopDishesActivity;

    # getter for: Lcom/example/m6wmr/ShopDishesActivity;->shopid:Ljava/lang/String;
    invoke-static {v13}, Lcom/example/m6wmr/ShopDishesActivity;->access$15(Lcom/example/m6wmr/ShopDishesActivity;)Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    const-string v13, "&ios=marketos&datatype=json&uid="

    invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    invoke-virtual {v12, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    const-string v13, "&pwd="

    invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    invoke-virtual {v12, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    .line 488
    invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v10

    .line 491
    .local v10, "url":Ljava/lang/String;
    const-string v12, "ShopshowACtivity"

    new-instance v13, Ljava/lang/StringBuilder;

    const-string v14, "getshopSource"

    invoke-direct {v13, v14}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v13, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v13

    invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-static {v12, v13}, Lmyapp/Mylog;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 493
    iget-object v12, p0, Lcom/example/m6wmr/ShopDishesActivity$3;->this$0:Lcom/example/m6wmr/ShopDishesActivity;

    iget-object v12, v12, Lcom/example/m6wmr/ShopDishesActivity;->m:Lmyapp/MyApp;

    invoke-static {v10, v12}, LPlugclass/HttpConn;->getStr(Ljava/lang/String;Lmyapp/MyApp;)Ljava/lang/String;

    move-result-object v8

    .line 494
    .local v8, "str":Ljava/lang/String;
    const-string v12, "str----------------"

    invoke-static {v12, v8}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 498
    :try_start_0
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1, v8}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 499
    .local v1, "json":Lorg/json/JSONObject;
    const-string v12, "error"

    invoke-virtual {v1, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v12

    const-string v13, "true"

    invoke-virtual {v12, v13}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v12

    if-eqz v12, :cond_0

    .line 501
    const-string v12, "msg"

    invoke-virtual {v1, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v12

    iput-object v12, v2, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 502
    const/4 v12, 0x1

    iput v12, v2, Landroid/os/Message;->arg1:I

    .line 503
    sget-object v12, Lcom/example/m6wmr/ShopDishesActivity;->h:Landroid/os/Handler;

    invoke-virtual {v12, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 539
    .end local v1    # "json":Lorg/json/JSONObject;
    :goto_0
    return-void

    .line 506
    .restart local v1    # "json":Lorg/json/JSONObject;
    :cond_0
    const-string v12, "msg"

    invoke-virtual {v1, v12}, Lorg/json/JSONObject;->isNull(Ljava/lang/String;)Z

    move-result v12

    if-eqz v12, :cond_1

    .line 508
    const/4 v12, 0x2

    iput v12, v2, Landroid/os/Message;->arg1:I

    .line 509
    sget-object v12, Lcom/example/m6wmr/ShopDishesActivity;->h:Landroid/os/Handler;

    invoke-virtual {v12, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 531
    .end local v1    # "json":Lorg/json/JSONObject;
    :catch_0
    move-exception v0

    .line 533
    .local v0, "e":Lorg/json/JSONException;
    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    .line 536
    const/4 v12, 0x2

    iput v12, v2, Landroid/os/Message;->arg1:I

    .line 537
    sget-object v12, Lcom/example/m6wmr/ShopDishesActivity;->h:Landroid/os/Handler;

    invoke-virtual {v12, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_0

    .line 512
    .end local v0    # "e":Lorg/json/JSONException;
    .restart local v1    # "json":Lorg/json/JSONObject;
    :cond_1
    :try_start_1
    const-string v12, "msg"

    invoke-virtual {v1, v12}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v4

    .line 513
    .local v4, "obj":Lorg/json/JSONObject;
    const-string v12, "shopinfo"

    invoke-virtual {v4, v12}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v7

    .line 514
    .local v7, "shopinfo":Lorg/json/JSONObject;
    iget-object v12, p0, Lcom/example/m6wmr/ShopDishesActivity$3;->this$0:Lcom/example/m6wmr/ShopDishesActivity;

    new-instance v13, Lbean/ShopBean;

    invoke-direct {v13}, Lbean/ShopBean;-><init>()V

    iput-object v13, v12, Lcom/example/m6wmr/ShopDishesActivity;->sb:Lbean/ShopBean;

    .line 516
    iget-object v12, p0, Lcom/example/m6wmr/ShopDishesActivity$3;->this$0:Lcom/example/m6wmr/ShopDishesActivity;

    iget-object v12, v12, Lcom/example/m6wmr/ShopDishesActivity;->sb:Lbean/ShopBean;

    const-string v13, "shopname"

    invoke-virtual {v7, v13}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v12, v13}, Lbean/ShopBean;->setShopName(Ljava/lang/String;)V

    .line 517
    iget-object v12, p0, Lcom/example/m6wmr/ShopDishesActivity$3;->this$0:Lcom/example/m6wmr/ShopDishesActivity;

    const-string v13, "collect"

    invoke-virtual {v7, v13}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v13

    invoke-static {v12, v13}, Lcom/example/m6wmr/ShopDishesActivity;->access$13(Lcom/example/m6wmr/ShopDishesActivity;Ljava/lang/String;)V

    .line 518
    const-string v12, "notice_info"

    invoke-virtual {v7, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    .line 519
    .local v3, "notice_info":Ljava/lang/String;
    const-string v12, "notice_info"

    invoke-static {v12, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 521
    iget-object v12, p0, Lcom/example/m6wmr/ShopDishesActivity$3;->this$0:Lcom/example/m6wmr/ShopDishesActivity;

    .line 522
    const-string v13, "shopinfo"

    const/4 v14, 0x0

    .line 521
    invoke-virtual {v12, v13, v14}, Lcom/example/m6wmr/ShopDishesActivity;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v11

    .line 523
    .local v11, "userInfo":Landroid/content/SharedPreferences;
    invoke-interface {v11}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v12

    const-string v13, "notice_info"

    invoke-interface {v12, v13, v3}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v12

    invoke-interface {v12}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 527
    iput-object v8, v2, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 529
    const/4 v12, 0x3

    iput v12, v2, Landroid/os/Message;->arg1:I

    .line 530
    sget-object v12, Lcom/example/m6wmr/ShopDishesActivity;->h:Landroid/os/Handler;

    invoke-virtual {v12, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_0
.end method

.method public declared-synchronized start()V
    .locals 1

    .prologue
    .line 542
    monitor-enter p0

    :try_start_0
    invoke-super {p0}, Ljava/lang/Thread;->start()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 543
    monitor-exit p0

    return-void

    .line 542
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
